package com.zb.entity.dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.zb.entity.ZjAdmStoreAuthor;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.Date;

/**
 * @Author WEN
 * @Date 2023/7/14 0014
 **/
@Data
@ApiModel("仓库权限列表封装")
public class StoreAuthorList {
    @ApiModelProperty(value = "主健ID")
    private Long id;

    @ApiModelProperty(value = "仓库类型：1- 入库，2-出库，3-调拨，4-盘点")
    private Integer type;

    @ApiModelProperty(value = "权限类型：1-入库/出库审核，2-发货，3-出库，4-作废")
    private Integer category;

    @ApiModelProperty(value = "是否禁用：0-否，1-是")
    private Boolean disabled;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    public static StoreAuthorList beanToDto(ZjAdmStoreAuthor author) {
        StoreAuthorList a = new StoreAuthorList();
        BeanUtils.copyProperties(author, a);
        a.setCreateTime(author.getGmtCreate());
        a.setUpdateTime(author.getGmtUpdate());
        return a;
    }
}
